package com.uday.kraterchat.chatclient.control
{
	import com.adobe.cairngorm.control.FrontController;
	import com.uday.kraterchat.chatclient.command.KeepAliveCommand;
	import com.uday.kraterchat.chatclient.command.LoginUserCommand;
	import com.uday.kraterchat.chatclient.command.LogoutUserCommand;
	import com.uday.kraterchat.chatclient.command.RegisterUserCommand;
	import com.uday.kraterchat.chatclient.command.SendMessageCommand;
	import com.uday.kraterchat.chatclient.command.SubscribeMsgCommand;

	public class ChatClientController extends FrontController
	{
		public function ChatClientController()
		{
			super();
			addCommand(EVENT_LOGIN,LoginUserCommand);
			addCommand(EVENT_LOGOUT,LogoutUserCommand);
			addCommand(EVENT_FRIEND_LIST,SubscribeMsgCommand);
			addCommand(EVENT_REGISTER_USER,RegisterUserCommand);
			addCommand(EVENT_SEND_MSG,SendMessageCommand);
			addCommand(EVENT_KEEP_ALIVE,KeepAliveCommand);
		}
		
		public static var EVENT_REGISTER_USER:String = "registerUser";
		public static var EVENT_LOGIN:String = "loginUser";
		public static var EVENT_LOGOUT:String = "logoutUser";
		public static var EVENT_FRIEND_LIST:String = "friendList";
		public static var EVENT_SEND_MSG:String = "sendMessage";
		public static var EVENT_KEEP_ALIVE:String = "keepAlive";
	}
}